package com.cms.controller.front;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;

import com.cms.entity.Content;
import com.cms.interceptor.SiteInterceptor;
import com.cms.routes.RouteMapping;
import com.jfinal.aop.Before;
import com.jfinal.plugin.activerecord.Page;


@RouteMapping(url = "/static")
@Before(SiteInterceptor.class)
public class StaticController extends BaseController{
	public void skips() {
        render("/templates/default_pc/jianshe.html");
    }
    
    public void message() {
        render("/templates/default_pc/message.html");
    }
    public void messageEmail() {
        render("/templates/default_pc/messageEmail.html");
    }
    public void search() throws UnsupportedEncodingException {
    	String keyword = getPara("keyword");
    	String pageNumber = getPara("pageNumber");
    	if(null == pageNumber || "".equals(pageNumber)){
    		pageNumber = "1";
    	}
    	String str = null;
    	if(!"".equals(keyword) || null != keyword){
    		str = URLDecoder.decode(keyword, "utf-8");
    	}
    	setAttr("keywordIso",keyword);
    	/*URLEncoder.encode(value, "utf-8");*/
    	setAttr("keyword",str);
    	setAttr("pageNumber",pageNumber);
        render("/templates/default_pc/news_search_list.html");
    }
    public void zhuanti() {
        render("/templates/default_pc/zhuanti.html");
    }
    public void map() {
        render("/templates/default_pc/map.html");
    }
}
